//
// Created by anita on 2023/10/21.
//

#ifndef NYUSH4_PROMPT_H
#define NYUSH4_PROMPT_H

#include <stdbool.h>

// globals.h

#define MAX_JOBS 100
#define MAX_COMMAND_ARGS 1024
#define MAX_COMMAND_LENGTH 1024

typedef struct Job
{
    pid_t pid;                    // process id
    char cmd[MAX_COMMAND_LENGTH]; // command
    struct Job *next;             // next job
} Job_t;                          // job struct

void print_prompt(void);
int execute_command(int argc, char **args);
void list_jobs(void);
void add_job(pid_t pid, char *cmd);
Job_t *pop_job(int id);
bool jobs_is_empty(void);

#endif // NYUSH4_PROMPT_H
